<?php

include('../global/global.inc.php');

// loop through each zipcode returned and format the response for jQuery
$data = array();
$result = mysql_query("SELECT username from users where username LIKE '%".$_REQUEST['term']."%'");
while($row = mysql_fetch_array($result)) {
    $data[] = array('label' => $row['username']);
}


// jQuery wants JSON data
echo json_encode($data);
flush();
?>